package com.zbkj.crmeb.enums;

import java.util.Objects;

/**
 * 功能描述: 品牌审核状态枚举
 * @Author: wangzh
 * @Date: 2023/5/31 15:32
 */
public enum BrandAuditEnum {
    PENDING_PROCESSING(1, "待处理"),

    HAVE_BEEN_ADDED(2, "已添加"),

    HAVE_BEEN_REJECTED(3, "已驳回"),

    ;


    private final Integer code;

    private final String msg;

    BrandAuditEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static BrandAuditEnum getEnumByCode(Integer code) {
        for (BrandAuditEnum value : values()) {
            if (Objects.equals(value.getCode(), code)) {
                return value;
            }
        }
        return PENDING_PROCESSING;
    }
}
